//package com.hamster.crmpre.web;
//
//import com.hamster.crmpre.config.LoginInterceptor;
//import com.hamster.crmpre.pojo.EmployeePerformance;
//import com.hamster.crmpre.service.EmployeePerformanceService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.http.ResponseEntity;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.List;
//
///**
// * @author ：Lizhipeng
// * @date ：Created in 2019/12/25 9:57
// * @description：员工业绩控制器
// * @modified By： Lizhipeng
// * @version: 1.0
// */
//@RestController
//@RequestMapping("employeePerformance")
//public class EmployeePerformanceController {
//
//    @Autowired
//    private EmployeePerformanceService employeePerformanceService;
//
//    /**
//     * 新增一条员工业绩信息
//     * @param employeePerformance 员工业绩信息
//     * @return 状态码200
//     */
//    //@PostMapping("insert")
//    public ResponseEntity<Void> insert(@RequestBody EmployeePerformance employeePerformance){
//        employeePerformanceService.insert(employeePerformance);
//        return ResponseEntity.ok().build();
//    }
//
//    /**
//     * 查询员工业绩信息的请求处理
//     * @return 员工业绩信息列表
//     */
//    @GetMapping("list")
//    public ResponseEntity<List<EmployeePerformance>> list() {
//        String userId = LoginInterceptor.getLoginUser().getUserId();
//        EmployeePerformance employeePerformance = employeePerformanceService.get(userId);
//        String executiveId = employeePerformance.getExecutiveId();
//        List<EmployeePerformance> employeePerformanceList = employeePerformanceService.list(executiveId);
//        return ResponseEntity.ok(employeePerformanceList);
//    }
//
//    /**
//     * 根据员工业绩id，修改员工业绩信息
//     * @param employeePerformance 员工业绩信息
//     * @return 状态码200
//     */
//    //@PostMapping("update")
//    public ResponseEntity<Void> update(@RequestBody EmployeePerformance employeePerformance){
//        employeePerformanceService.update(employeePerformance);
//        return ResponseEntity.ok().build();
//    }
//
//    /**
//     * 根据员工业绩id 删除
//     * @param ids
//     * @return
//     */
//    //@PostMapping("delete")
//    public ResponseEntity<Void> delete(@RequestBody List<String> ids){
//        employeePerformanceService.delete(ids);
//        return ResponseEntity.ok().build();
//    }
//
//
//}
